"""
This setup script allows one to build an executable app from the
command line.

Currently only support Mac OSX.

Usage:
    python setup.py py2app
"""

from setuptools import setup
from os import path
import OMB

APP = ['OMB.py']
DATA_FILES = []
VERSION = OMB.version
COPYRIGHT = "Copyright 2001724000.  Released under the terms of the Artistic Licence/GPL."
PLIST = {'CFBundleGetInfoString':'OSC-MIDI Bridge',
         'CFBundleVersion':'1.0',
         'NSHumanReadableCopyright':COPYRIGHT,
         'CFBundleDisplayName':'OSC-MIDI Bridge',
         }

# Resources
resourcesAbsPath = path.abspath("resources")
confAbsPath = path.abspath("conf")
RESOURCES = [resourcesAbsPath, confAbsPath]

ICONFILE = path.abspath('resources/app.icns')

OPTIONS = {'argv_emulation': False,
           'plist':PLIST,
           'resources':RESOURCES,
           'iconfile':ICONFILE,
           'includes':['sip']}

setup(
    version=VERSION,
    app=APP,
    data_files=DATA_FILES,
    licence="Artistic Licence/GPL",
    url="http://osc-midi-bridge.googlecode.com",
    author="2001724000",
    author_email="mc07jap@leeds.ac.uk",
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)
